<?php
class MyClass
{
	const MAX_PROPS = 3;
	
	//decleration
	public static $numOfProps = 0;
	public $prop;
	
	public function __construct()
	{
		//var_dump($this->prop);exit;
		//unset($this->prop);
	}
	
	public function __get($paramName)
	{
		var_dump($paramName);
		/*if(self::MAX_PROPS <= self::$numOfProps){
			throw new ErrorException("You are over to limit of num of props");
		}*/
		var_dump(self::$numOfProps);
		self::$numOfProps++;	
		$this->$paramName = null;
		return $this->$paramName;
	}
}
//$arr = array('a' => null);
//var_dump(array_key_exists('a', $arr));
//$false = false;
//var_dump(empty($false));
$obj = new MyClass();
echo $obj->id;
echo $obj->prop;
echo $obj->name;
echo $obj->exita;
echo $obj->exitaaaa;
var_dump("dsadsdd");